﻿using LogLib;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Mp3Player
{   
    public partial class FormMessageInteraction : Form
    {
        #region Events     
        public event EventHandler SpeakingDone;
        protected void OnSpeakingDone()
        {
            if (SpeakingDone != null)
            {
                SpeakingDone(null, null);
            }
        }
        #endregion

        public FormMessageInteraction()
        {
            InitializeComponent();
        }

        private const int MM_MCINOTIFY = 0x3B9;

        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case MM_MCINOTIFY:
                    OnSpeakingDone();
                    break;
                default:
                    base.WndProc(ref m);
                    break;
            }
        }

        private void FormMessageInteraction_Load(object sender, EventArgs e)
        {
            Log.WriteAsync("语音功能的信息交互窗体加载完成.");
        }
    }
}
